%1 Enter the column to total:
%2 Enter the table that contains the column:
%3 Enter the column that contains the date:
%template
CLEAR VARIABLE date
CLEAR VARIABLE vdate
CLS
FILLIN date USING "Enter the date to sum or [ENTER] for today: " AT 9 15
IF date FAILS THEN
  SET VAR date TO .#DATE
  SHOW VAR date AT 9 59
ENDIF
COMPUTE vdate AS SUM %1 FROM %2 WHERE %3 EQ .date
WRITE "Total for this date: " AT 11 15
SHOW VAR vdate AT 11 36
WRITE "Press any key to continue" AT 13 15
PAUSE
